<script lang="ts" name="person-new" setup>
import { type PersonInter, type Persons } from '@/types'

//接口 自定义类型 泛型
//单个
// let person:PersonInter = {
//   id: '1111',
//   name:'张三',
//   age: 60
// }
//< PersonInter > 泛型
let personList:Array<PersonInter> = [
  {id: '1111',name:'张三',age: 60},
  {id: '222',name:'赵四',age: 60},
  {id: '3333',name:'王五',age: 60},
]

let persons:Persons = [
  {id: '1111',name:'张三',age: 60},
  {id: '222',name:'赵四',age: 60},
  {id: '3333',name:'王五',age: 60},
]
</script>

<template>
  <div class="person">
    ???
  </div>
</template>

<style scoped>
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
</style>